// 监听扩展安装事件
chrome.runtime.onInstalled.addListener(() => {
    console.log('网页内容工具箱已安装');
});

// 处理来自content script的消息
chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {
    if (request.type === 'download') {
        chrome.downloads.download({
            url: request.data,
            filename: request.filename,
            saveAs: true
        });
    }
}); 